<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class FourRest extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'four_rest';
    protected $guarded = [];

    public function es()
    {
        return $this->hasOne(FourPatient::class,'id','patient_id');
    }

    public function source()
    {
        return $this->hasOne(FourSource::class,'id','source_id');
    }
    public function type()
    {
        return $this->hasOne(Fourbusiness::class,'id','bussiness_type');
    }

    public function types()
    {
        return $this->hasOne(FourType::class,'id','drug_id');
    }

    public function pay()
    {
        return $this->hasOne(FourPay::class,'id','pay_id');
    }

    public function des()
    {
        return $this->hasOne(FourInpatient::class,'id','inpatient_id');
    }

}
